package com.epcs.model.dto;
// Generated 12:25:30 14-02-2014 by Hibernate Tools 3.2.1.GA

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Cascade;
import org.hibernate.annotations.CascadeType;
import org.hibernate.annotations.Fetch;
import org.hibernate.annotations.FetchMode;

/**
 * Notification generated by hbm2java
 */
@Entity
@Table(name = "notification", catalog = "epcs")
public class Notification implements java.io.Serializable {

    private Integer notificationId;
    private Following following;
    private String content;
    private Integer status;
    private String typeOfNotification;
    private String lastUpdated;

    public Notification() {
    }

    public Notification(Following following, String content, Integer status) {
        this.following = following;
        this.content = content;
        this.status = status;
    }

    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "notificationID", unique = true, nullable = false)
    public Integer getNotificationId() {
        return this.notificationId;
    }

    public void setNotificationId(Integer notificationId) {
        this.notificationId = notificationId;
    }

    @ManyToOne(fetch = FetchType.EAGER)
    @Cascade(CascadeType.ALL)
    @JoinColumn(name = "followingID")
    public Following getFollowing() {
        return this.following;
    }

    public void setFollowing(Following following) {
        this.following = following;
    }

    @Column(name = "content", length = 65535)
    public String getContent() {
        return this.content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    @Column(name = "status")
    public Integer getStatus() {
        return this.status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    @Column(name = "typeOfNotification", nullable = false, length = 15)
	public String getTypeOfNotification() {
		return typeOfNotification;
	}

	public void setTypeOfNotification(String typeOfNotification) {
		this.typeOfNotification = typeOfNotification;
	}
	
	@Column(name = "lastUpdated", nullable = false, length = 45)
	public String getLastUpdated() {
		return lastUpdated;
	}
	
	public void setLastUpdated(String lastUpdated) {
		this.lastUpdated = lastUpdated;
	}
}
